package com.saladin.personalFinancialSystem.controller;

import com.saladin.personalFinancialSystem.model.*;
import com.saladin.personalFinancialSystem.service.FinancialRecordService;
import jakarta.servlet.http.HttpSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.math.BigDecimal;
import java.time.YearMonth;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;

@RestController
@RequestMapping("/FinancialRecord")
public class FinancialRecordController {

    @Autowired
    private FinancialRecordService financialRecordService;
    /**
     * 获取商品的信息并且返回给客户端
     * @param userId
     * @return
     */
    @GetMapping("/QueryFinancialRecordList")
    public List<FinancialRecord> QueryFinancialRecordList(int userId) {
        List<FinancialRecord> financialRecordList = financialRecordService.queryFinancialRecordList(userId);
        return financialRecordList;
    }

}

